/*
 * ---------------------------------------------------------------------
 * Copyright (c) 2014, 2015 All Right Reserved
 * This software is developed for study and improve coding skill ...
 *
 * Project:  Excellent Coding< EC >
 *
 * LibraryLoader.h
 * This file for dll loader define and encapsulation.
 *
 * Eamil:   epengao@126.com
 * Author:  Peter Gao
 * Version: Intial first version.
 * --------------------------------------------------------------------
 */

#ifndef EC_DLL_LOADER_H
#define EC_DLL_LOADER_H

#include "ecBaseType.h"

#ifdef _WIN32
#include <windows.h>
#elif defined _LINUX
#include <Linux.h>
#endif

namespace ec {

class ecDllLoader
{
public:
    static EC_HANDLE   LoadDLL(EC_PCHAR pDllPath);
    static void        FreeDLL(EC_HANDLE pDLLHandle);
    static EC_FUNENTRY GetDLLFunAddress(EC_HANDLE hDllHandle, EC_PCHAR pFunName);

protected:
    ecDllLoader();
};

} /* namespace ec */
#endif /* EC_LIBRARY_LOADER_H */